package tg.app.rj.cupm;

import java.rmi.RemoteException;

import psdi.mbo.Mbo;
import psdi.mbo.MboRemote;
import psdi.mbo.MboSet;
import psdi.util.MXException;

public class CupmStatus extends Mbo implements CupmStatusRemote {

	private static final long serialVersionUID = -1045957376184593967L;

	public CupmStatus(MboSet mboset) throws RemoteException {
		super(mboset);
	}

	public void init() throws MXException {
		setFlag(7L, true);
		super.init();
	}

	public void add() throws MXException, RemoteException {
		MboRemote mboremote = getOwner();
		if (mboremote == null || !mboremote.getName().equals("CUPM")) {
		} else {
			setValue("CUPMNUM", mboremote.getString("CUPMNUM"), 2L);
			setValue("status", mboremote.getString("status"), 2L);
			// setValue("DESCRIPTION", mboremote.getString("DESCRIPTION"), 2L);
			setValue("changedate", mboremote.getDate("statusdate"), 2L);
			setValue("CHANGEBY", mboremote.getUserInfo().getPersonId(), 3L);
			setValue("siteid", mboremote.getString("siteid"), 2L);
			setValue("orgid", mboremote.getString("orgid"), 2L);
			return;
		}
	}
}
